from typing import List, Dict
from champions.base_champion import Champion


class ChampionUI:
    def __init__(self):
        pass
    
    def show_champion_list(self, champions: List[Champion]):
        if not champions:
            print("no champion")
            return
        
        print("\\n champion list:")
        for i, champion in enumerate(champions, 1):
            status = "survive" if champion.is_alive else "die"
            print(f"{i}. {champion.name} (grade {champion.level}) - {status}")
    
    def show_champion_details(self, champion: Champion):
        print(f"\\n{champion.name} detailed information")
        print(f"type: {champion.get_champion_type()}")
        print(f"level: {champion.level}")
        print(f"health: {champion.health}/{champion.max_health}")
        print(f"mana: {champion.mana}/{champion.max_mana}")
        print(f"attack: {champion.attack}")
        print(f"defense: {champion.defense}")
        print(f"speed: {champion.speed}")
        print(f"status: {'survive' if champion.is_alive else 'die'}")
        
        print("\\n ability:")
        for ability in champion.get_abilities():
            print(f"  - {ability}")
        
        print("\\n equipped items:")
        if champion._equipped_items:
            for item in champion._equipped_items:
                print(f"  - {item.name}")
        else:
            print("no equipped items")
    
    def show_ability_selection(self, champion: Champion):
        abilities = champion.get_abilities()
        
        print(f"\\n{champion.name} ability:")
        for i, ability in enumerate(abilities, 1):
            print(f"{i}. {ability}")
        
        return abilities
